﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using NavKet.Models;

namespace NavKet.Controllers
{
    public class ShopController : Controller
    {
        //
        // GET: /Shop/
        MallEntities1 navKetEntity = new MallEntities1();
        public ActionResult Index(int id)
        {
          
           Vw_ShopDetails shopDetails = navKetEntity.SelectVWShopDetailsByShopId(id).SingleOrDefault();
            //rest of Images
            List<string> shopImagesList = navKetEntity.SelectShopImagesByShopId(id).Select(x=>x.ImgName).ToList();
            //branches
            //
           
            List<VW_ShopBranch> shopBranchesList = navKetEntity.SelectVwShopBranchesByShopId(id).ToList() ;

            //delartments
            //List<Department> shopDepartmentList = navKetEntity.SelectVwDepartmentsDetailsByShopId(id).ToList();
           // Department d = new Department();
                 
           // ViewBag.Departments = shopDepartmentList;

            //Category
           // List<VW_ShopCategory> shopCategoryList = navKetEntity.SelectVwShopCategoryByShopId(id).ToList();

            //services
            //List<ShopService> ServicesList = navKetEntity.SelectShopServicesByShopId(id).ToList();

            ViewBag.MallName= shopDetails.MallName;
            ViewBag.MallId = shopDetails.MallID;
           
            return View(shopDetails);
        }

    }
}
